//
//  User.h
//  MM
//
//  Created by 郑渊文 on 5/21/15.
//  Copyright (c) 2015 王晨辉. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "APIClient.h"
#import "BaseModel.h"

@interface UserDAL : BaseModel

@property (strong, nonatomic) NSString *userID;
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *password;

//登陆
+ (NSURLSessionDataTask *)getUser:(NSDictionary *)paramDic
                          success:(void (^)(UserDAL *user))block
                           failed:(void (^)(NSError *error))error;
//
//
////Login
//+ (NSURLSessionDataTask *)Login_WithParams:(NSDictionary*)paramDic
//                                withBlock:(void (^)(NSArray *data, NSError *error))block;

//获取验证码
+ (NSURLSessionDataTask *)getCheckNum:(NSDictionary *)paramDic
                             withBlock:(void (^)(NSString *checkNum, NSError *error))block;


//注册
+ (NSURLSessionDataTask *)registerWithParams:(NSDictionary *)paramDic
                            withBlock:(void (^)(NSArray *data, NSError *error))block;

//首页图片
+ (NSURLSessionDataTask *)getFirstImgWithParams:(NSDictionary *)paramDic
                                   withBlock:(void (^)(NSArray *data, NSError *error))block;

//家园系统
+ (NSURLSessionDataTask *)getHomeDataWithParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSArray *data, NSError *error))block;
//活动类别
+ (NSURLSessionDataTask *)getOutDoorActivitiesWithParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSArray *data, NSError *error))block;

//活动报名接口
+ (NSURLSessionDataTask *)getActivityJoinedInfoWithParams:(NSDictionary *)paramDic
                                                withBlock:(void (^)(NSArray *data, NSError *error))block;
//发表活动评论接口
+ (NSURLSessionDataTask *)getActivityCommentsWithParams:(NSDictionary *)paramDic
                                              withBlock:(void (^)(NSArray *data, NSError *error))block;
//参与活动接口
+ (NSURLSessionDataTask *)getActivityJoineWithParams:(NSDictionary *)paramDic
                                           withBlock:(void (^)(NSArray *data, NSError *error))block;

//课程支付接口
+ (NSURLSessionDataTask *)getClassesPaymentWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSArray *data, NSError *error))block;


//注销
+ (void)logoutAccount;
///获取userdefault中存的用户名 和钥匙串中密码
+ (void)getAccount:(void (^)(NSString *username,NSString *password))block;
//存储用户名userdefault ,密码到钥匙串
+ (void)saveAccount:(NSString *)name andPassword:(NSString *)password;


@end
